// import { UnityEngine } from "csharp";

import { Vec2, Vec3 } from "cc";


export class Vector3
{
   
    public x:number = 0;
    public y:number = 0;
    public z:number = 0; 


    constructor(srcX?:number,srcY?:number,srcZ?:number)
    {
        this.x = (srcX != null ?srcX:0);
        this.y = (srcY != null ?srcY:0);
        this.z = (srcZ != null ?srcZ:0);
    }

    public static Distance(firstV3:Vector3,secondV3:Vector3)
    {
        var uFrist = new Vec3(firstV3.x,firstV3.y,firstV3.z);
        var uSecond = new Vec3(secondV3.x,secondV3.y,secondV3.z)
        return Vec3.distance(uFrist, uSecond);
    }

    /**
     * 
     * @returns 获取原生层数据
     */
    public GetOrigin():Vec3
    {
       return new Vec3(this.x,this.y,this.z);
    }

    Eval(pos: Vector3)
    {        
        this.x = pos.x;
        this.y = pos.y;
        this.z = pos.z;
    }

    
}

export class Vector2
{
    public x:number = 0;
    public y:number = 0;

    /**
     * 
     * @returns 获取原生层数据
     */
    public GetOrigin():Vec2
    {
       return new Vec2(this.x,this.y);
    }
}